Skip to content

tests(_internal): Add async tests for file_lock module#505

Open
tony wants to merge 3 commits intopr/file-lockfrom
pr/file-lock-asyncio
Open

tests(_internal): Add async tests for file_lock module#505
tony wants to merge 3 commits intopr/file-lockfrom
pr/file-lock-asyncio

Conversation

@tony
Copy link
Copy Markdown
Member

@tony tony commented Dec 30, 2025

Summary

  • Add async tests for AsyncFileLock and async_atomic_init
  • Add pytest-asyncio dependency and configuration

Depends on #501.

Test plan

  • 8 async tests for AsyncFileLock (context manager, acquire/release, reentrant, timeout, etc.)
  • 4 async tests for async_atomic_init (first init, already done, sync fn, concurrent)

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 30, 2025

Codecov Report

❌ Patch coverage is 99.20635% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 61.43%. Comparing base (1bd57a4) to head (9456c94).

Files with missing lines Patch % Lines
tests/_internal/test_file_lock_async.py 99.20% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           pr/file-lock     #505      +/-   ##
================================================
+ Coverage         59.98%   61.43%   +1.45%     
================================================
  Files                42       43       +1     
  Lines              6930     7056     +126     
  Branches           1130     1130              
================================================
+ Hits               4157     4335     +178     
+ Misses             2235     2180      -55     
- Partials            538      541       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony tony mentioned this pull request Apr 26, 2026
tony added 3 commits April 26, 2026 07:02
why: Required for async test support.
what:
- Add pytest-asyncio to dev and testing dependency groups
why: Test async file locking functionality.
what:
- Add TestAsyncFileLock with 8 async tests
- Add TestAsyncAtomicInit with 4 async tests
- Tests cover context manager, acquire/release, timeout, concurrent access
@tony tony force-pushed the pr/file-lock-asyncio branch from 77787d2 to 9456c94 Compare April 26, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant